package com.oldbss.beans;

// Generated May 26, 2013 11:19:35 PM by Hibernate Tools 3.3.0.GA

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * UtensilAllocation generated by hbm2java
 */
@Entity
@Table(name = "utensil_allocation", catalog = "bss")
public class UtensilAllocation implements java.io.Serializable {

	private Integer utensilAllocationId;
	private PatientRecord patientRecord;
	private int allocationType;
	private String amountDeposited;
	private Date allocationDate;
	private Date returnDate;

	public UtensilAllocation() {
	}

	public UtensilAllocation(PatientRecord patientRecord, int allocationType,
			String amountDeposited, Date allocationDate) {
		this.patientRecord = patientRecord;
		this.allocationType = allocationType;
		this.amountDeposited = amountDeposited;
		this.allocationDate = allocationDate;
	}

	public UtensilAllocation(PatientRecord patientRecord, int allocationType,
			String amountDeposited, Date allocationDate, Date returnDate) {
		this.patientRecord = patientRecord;
		this.allocationType = allocationType;
		this.amountDeposited = amountDeposited;
		this.allocationDate = allocationDate;
		this.returnDate = returnDate;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "utensilAllocationId", unique = true, nullable = false)
	public Integer getUtensilAllocationId() {
		return this.utensilAllocationId;
	}

	public void setUtensilAllocationId(Integer utensilAllocationId) {
		this.utensilAllocationId = utensilAllocationId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "patientId", nullable = false)
	public PatientRecord getPatientRecord() {
		return this.patientRecord;
	}

	public void setPatientRecord(PatientRecord patientRecord) {
		this.patientRecord = patientRecord;
	}

	@Column(name = "allocationType", nullable = false)
	public int getAllocationType() {
		return this.allocationType;
	}

	public void setAllocationType(int allocationType) {
		this.allocationType = allocationType;
	}

	@Column(name = "amountDeposited", nullable = false, length = 45)
	public String getAmountDeposited() {
		return this.amountDeposited;
	}

	public void setAmountDeposited(String amountDeposited) {
		this.amountDeposited = amountDeposited;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "allocationDate", nullable = false, length = 19)
	public Date getAllocationDate() {
		return this.allocationDate;
	}

	public void setAllocationDate(Date allocationDate) {
		this.allocationDate = allocationDate;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "returnDate", length = 19)
	public Date getReturnDate() {
		return this.returnDate;
	}

	public void setReturnDate(Date returnDate) {
		this.returnDate = returnDate;
	}

}
